home *** CD-ROM | disk | FTP | other *** search
- property Xpos, xSteps, Ypos, ySteps, channel, multiplier, rotatorMovie
- global gCustomCursor, gRollAnimButton, g3DObject
-
- on birth me
- set channel to 2
- set Xpos to 0
- set xSteps to 23
- set Ypos to 0
- set ySteps to 13
- set multiplier to 2
- return me
- end
-
- on setup me
- puppetSprite(channel, 1)
- set the castNum of sprite channel to the number of cast rotatorMovie
- set the locH of sprite channel to 331
- set Xpos to 0
- set Ypos to 10
- paletteFix()
- set the visible of sprite channel to 0
- go(the frame + 1)
- set the movieTime of sprite channel to 230
- set the visible of sprite channel to 1
- end
-
- on arrowButton me
- if not objectp(gRollAnimButton) then
- if objectp(gCustomCursor) then
- resetTool(g3DObject)
- exit
- else
- set handlerName to the name of cast the castNum of sprite the clickOn
- if char length(handlerName) of handlerName <> "+" then
- set commandString to handlerName & "( gRotatorObject )"
- birth(script "Repeating Button Class", commandString, 6)
- end if
- end if
- end if
- end
-
- on left me
- set Xpos to Xpos - multiplier
- if Xpos < 0 then
- set Xpos to (xSteps * multiplier) - multiplier
- end if
- changeView(me)
- return 1
- end
-
- on right me
- set Xpos to Xpos + multiplier
- if Xpos = (xSteps * multiplier) then
- set Xpos to 0
- end if
- changeView(me)
- return 1
- end
-
- on down me
- if Ypos > 0 then
- set Ypos to Ypos - multiplier
- changeView(me)
- return 1
- else
- return 0
- end if
- end
-
- on Up me
- if Ypos < ((ySteps * multiplier) - multiplier) then
- set Ypos to Ypos + multiplier
- changeView(me)
- return 1
- else
- return 0
- end if
- end
-
- on changeView me
- set offset to Xpos + (Ypos * xSteps)
- set the movieTime of sprite channel to offset
- end
-
- on prepareToLeave me
- set Xpos to 0
- set Ypos to 0
- puppetSprite(channel, 0)
- end
-